
Technical Q&A's
QTMTB 10 - NewMovieFromScrap, Adding the Media Later (1-May-95)
Q When my application creates a new media (of text type in this case) for a new
track in a movie created with NewMovieFromScrap, the dataRef and dataRefType
should be set to nil, according to the QuickTime documentation. The problem is
that later I want to edit that media (adding a text sample to it, for example),
but BeginMediaEdits returns the noDataHandler error (no data handler found). I
assume I can get around that by first saving the movie to a file, but this
seems slimy since the movie won't end up on disk in the end. Any suggestions
for a better approach?
A You're correct -- BeginMediaEdits complains if the movie has been created with
NewMovieFromScrap. Unfortunately, BeginMediaEdits doesn't think memory-based
movies are on a media that will support editing. The workaround is to store the
movie in a temporary file until you're finished editing it.
When you call NewTrackMedia, pass an alias to a new file in the dataRef
parameter instead of nil. Passing nil (the usual approach) indicates that the
movie's default data reference should be used, but because your movie came from
the scrap and not a file, it has no data reference -- hence the error you're
getting. By the way, using the handle data handler in QuickTime 2.0 you can
create a movie entirely in memory.
Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Main |
Page One |
What's New |
Apple Computer, Inc. |
Find It |
Contact Us |
Help